package com.grape.springbootgradle20220520.network;

import java.rmi.NotBoundException;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import java.time.LocalDateTime;

/**
 * @Author pan_jin
 * @Description: $
 * @Date: 2022/5/25 9:31
 * @Version: 1.0.0
 * @Slogan: 梦想还是要有的万一实现了呢
 */
public class Client {
    public static void main(String[] args) throws RemoteException, NotBoundException {
        Registry localhost = LocateRegistry.getRegistry("localhost", 1099);
        WorkClock remote = (WorkClock) localhost.lookup("WorkClock");
        LocalDateTime localDateTime = remote.getLocalDateTime("Asia/Shanghai");
        System.out.println(localDateTime);

    }
}
